class MyArray<T> {
    private T[] arr =(T[]) new Object[20];

    public void set(int index,T val) {
        arr[index] = val;
    }

    public T get(int index) {
        return arr[index];
    }
}

public class Tesr {
    public static void main(String[] args) {

        MyArray<String> arr1 = new MyArray<>();
        arr1.set(0,"liming");
        System.out.println(arr1.get(0));

//        arr1.set(1,10);

    }
}
